spinbutton: Trivial cleanup
authorMatthias Clasen <mclasen@redhat.com>
Wed, 28 Oct 2015 20:35:16 +0000 (16:35 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 29 Oct 2015 01:55:13 +0000 (21:55 -0400)
Use g_clear_object in a few places.

gtk/gtkspinbutton.c

index bac8bdeb23369fc302d14c258e6f673511f30d64..a148c0679d91c30fbaf53553d65bde7579abbdec 100644 (file)
@@ -736,11 +736,8 @@ gtk_spin_button_finalize (GObject *object)
 
   gtk_spin_button_unset_adjustment (spin_button);
 
-  if (priv->down_panel_context)
-    g_object_unref (priv->down_panel_context);
-
-  if (priv->up_panel_context)
-    g_object_unref (priv->up_panel_context);
+  g_clear_object (&priv->up_panel_context);
+  g_clear_object (&priv->down_panel_context);
 
   g_object_unref (priv->swipe_gesture);